package org.example.auth.repository;

import org.example.auth.model.entity.Role;
import org.example.auth.model.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Optional;

public interface UserRepository extends JpaRepository<User, Long> {

    Optional<User> findByLoginNameAndPassword(String loginName, String password);

    Optional<User> findByLoginName(String loginName);

    List<User> findByCommonInfo_EnabledTrue();
}
